var objCode = document.getElementById("searchBook");
objCode.onclick = function () {
    var name = document.getElementById("bookName").value;  //获取输入的图书
    $("#selected").load("/book/getBookByName", buildQueryParam(1, name));
};


//包装查询参数
function buildQueryParam(page, bookName) {
    var query = {};
    query.page = typeof page == "undefined" ? 1 : page;
    query.bookName = bookName;
    return query;
}